home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / circuits / pcb-1.000 / pcb-1 / pcb-1.3 / crosshair.h < prev    next >
C/C++ Source or Header  |  1995-02-26  |  2KB  |  61 lines

  1. /*
  2.  *                            COPYRIGHT
  3.  *
  4.  *  PCB, interactive printed circuit board design
  5.  *  Copyright (C) 1994,1995 Thomas Nau
  6.  *
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation; either version 2 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  This program is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with this program; if not, write to the Free Software
  19.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  *  Contact addresses for paper mail and Email:
  22.  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  23.  *  Thomas.Nau@rz.uni-ulm.de
  24.  *
  25.  *  RCS: $Header: /sda4/users/nau/src/pcb/RCS/crosshair.h,v 2.1 1994/09/28 14:26:07 nau Exp nau $
  26.  */
  27.  
  28. /* prototypes for crosshair routines
  29.  */
  30.  
  31. #ifndef    __CROSSHAIR_INCLUDED__
  32. #define    __CROSSHAIR_INCLUDED__
  33.  
  34. #include "global.h"
  35.  
  36. /* ---------------------------------------------------------------------------
  37.  * fits screen coordinates into grid
  38.  */
  39. #define    GRIDFIT_X(x)    ((((x) -PCB->GridOffsetX) /PCB->Grid) *PCB->Grid +PCB->GridOffsetX)
  40. #define    GRIDFIT_Y(y)    ((((y) -PCB->GridOffsetY) /PCB->Grid) *PCB->Grid +PCB->GridOffsetY)
  41.  
  42. /* ---------------------------------------------------------------------------
  43.  * all possible states of an attached object
  44.  */
  45. #define    STATE_FIRST        0            /* initial state */
  46. #define    STATE_SECOND    1
  47. #define    STATE_THIRD        2
  48.  
  49.  
  50. void    CrosshairOn(Boolean);
  51. void    CrosshairOff(Boolean);
  52. void    HideCrosshair(Boolean);
  53. void    RestoreCrosshair(Boolean);
  54. void    MoveCrosshairRelative(Position, Position);
  55. void    MoveCrosshairAbsolute(Position, Position);
  56. void    SetCrosshairRange(Position, Position, Position, Position);
  57. void    InitCrosshair(void);
  58. void    DestroyCrosshair(void);
  59.  
  60. #endif
  61.